package com.dao;
import com.entity.AsCustoms;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

public interface AsCustomsDao
{
    //根据指定的用户id或查询条件查询其所有可用客户
    public ArrayList<AsCustoms> getAvaliableCustomsByUserIdAndCustomName(
            @Param( "userId" ) Integer userId ,
            @Param( "customName" ) String customName );


    //根据指定的用户id查询其客户
    public ArrayList<AsCustoms> getCustomsByUserIdAndCustomName(
            @Param( "userId" ) Integer userId ,
            @Param( "customName" ) String customName ,
            @Param( "index" ) Integer index ,
            @Param( "quantity" ) Integer end );

    //根据指定的用户id查询其客户数量
    public Integer getCustomsCountByUserId( Integer userId );

    //添加一位客户
    public Integer addOneCustom( AsCustoms custom );

    //根据id擦寻一位用户
    public AsCustoms getOneCustomById( Integer id );

    //更新用户
    public Integer updateOneCustom( AsCustoms custom );

}
